package hy.config;

import hy.beans.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyCfg1 {
    @Bean("user")//默认id名为方法名
    User addUser(){
        return new User("abc");
    }
}